#ifndef _UI_FLASHWIDGET_H_
#define _UI_FLASHWIDGET_H_

#include "ui_widget.h"
namespace flash
{
	class FlashMovie;
}

namespace ui
{
class UIFlashWidget : public UIWidget
{
public:
/// stuff that every self-respecting widget should have
						UIFlashWidget(UIWidget* pParent,const std::string& Name = "");
	virtual				~UIFlashWidget();
	virtual bool		Create(const std::string& Name, const math::Vec2& Pos = math::Vec2(0.5f, 0.5f), const math::Vec2& Size= math::Vec2(0.1f, 0.1f));
	virtual	bool		Load(LuaPlus::LuaObject& _LObj);
	/// update
	virtual	bool		Tick(float dt);
	/// display
	virtual bool		Render(bool Force = false);
	/// register with LUA Bind
	static	void		Register(LuaPlus::LuaState* _pScript);

	virtual UIWidget*	GetClone();

	void				SetFlashClip(const std::string& File);
	void				Reset();
	void				SetLoop(bool b);
	bool				IsLooping() const;
	bool				IsPaused() const;
	void				PauseClip(bool b);
	virtual void		ResetResources();
protected:
	virtual bool		ExportSpecificsToFile(script::WriteLua*	pWL);

// I don't need this in other platforms yet
#if defined(_PLATFORM_ANDROID) || defined(_PLATFORM_IOS)
#else
	flash::FlashMovie*	m_pFlashMovie;
#endif

};


}  //namespace ui

#endif // _UI_FLASHWIDGET_H_